#include <ros/ros.h>
#include <custom_srv/custom.h>

int main(int argc, char *argv[])
{
    ros::init(argc,argv,"client_srv_node");
    ros::NodeHandle nh;

    ros::ServiceClient client = nh.serviceClient<custom_srv::custom>("custom");

    while(ros::ok())
    {
        custom_srv::custom::Request req;
        custom_srv::custom::Response resp;
        req.a = rand();
        req.b = rand();
        bool ok = client.call(req,resp);
        if (ok)
        {
            ROS_INFO("%ld + %ld= %ld ",req.a,req.b,resp.sum);
        }
        sleep(2);
    }
    return 0;
}
